<template>
    <Table row-key="id" :columns="columns" :data="data"></Table>
</template>
<script>
    export default {
        data () {
            return {
                columns: [
                    {
                        title: '项目',
                        key: 'project',
                        tree: true
                    },
                    {
                        title: '诊室',
                        key: 'room'
                    },
                    {
                        title: '治疗人数',
                        key: 'PersonTime'
                    },
                    {
                        title: '治疗人次',
                        key: 'Number'
                    },
                    {
                        title: '治疗频率',
                        key: 'frequency'
                    },
                    {
                        title: '治疗量',
                        key: 'int'
                    },
                    {
                        title: '人均用量',
                        key: 'PTime'
                    },
                    {
                        title: '购买人数',
                        key: 'numberBuyers'
                    },
                    {
                        title: '购买量',
                        key: 'purchase'
                    },
                    {
                        title: '人均购买',
                        key: 'perPurchase'
                    }
                ],
                data: [
                    {
                        id: 100,
                        project: '308',
                        room: '诊室汇总',
                        PersonTime: 26,
                        Number: 38,
                        frequency: '1.04',
                        int: 369,
                        PTime: '1.3',
                        purchase: 56,
                        numberBuyers: '39',
                        perPurchase: '536',
                        children: [
                            {
                                id: 10010,
                                project: '308',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 36,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 10020,
                                project: '308',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 59,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 10030,
                                project: '308',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 18,
                                frequency: '1.04',
                                int: 21,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    },
                    {
                        id: 200,
                        project: '311',
                        room: '诊室汇总',
                        PersonTime: 23,
                        Number: 53,
                        frequency: '1.04',
                        int: 69,
                        PTime: '1.3',
                        purchase: 68,
                        numberBuyers: '39',
                        perPurchase: '536',
                        children: [
                            {
                                id: 20010,
                                project: '311',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 21,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 20020,
                                project: '311',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 39,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 20030,
                                project: '311',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 18,
                                frequency: '1.04',
                                int: 8,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    },
                    {
                        id: 300,
                        project: '药浴',
                        room: '诊室汇总',
                        PersonTime: 29,
                        Number: 62,
                        frequency: '1.04',
                        int: 87,
                        PTime: '1.3',
                        numberBuyers: '39',
                        purchase: 56,
                        perPurchase: '536',
                        children: [
                            {
                                id: 30010,
                                project: '药浴',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 36,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 30020,
                                project: '药浴',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 21,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 30030,
                                project: '药浴',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 30,
                                frequency: '1.04',
                                int: 308,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    },
                    {
                        id: 400,
                        project: '熏蒸',
                        room: '诊室汇总',
                        PersonTime: 35,
                        Number: 36,
                        frequency: '1.04',
                        int: 68,
                        PTime: '1.3',
                        numberBuyers: '39',
                        purchase: 56,
                        perPurchase: '536',
                        children: [
                            {
                                id: 40010,
                                project: '熏蒸',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 11,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 40020,
                                project: '熏蒸',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 23,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 40030,
                                project: '熏蒸',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 18,
                                frequency: '1.04',
                                int: 18,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    },
                    {
                        id: 500,
                        project: '注射',
                        room: '诊室汇总',
                        PersonTime: 35,
                        Number: 63,
                        frequency: '1.04',
                        int: 59,
                        PTime: '1.3',
                        numberBuyers: '39',
                        purchase: 56,
                        perPurchase: '536',
                        children: [
                            {
                                id: 50010,
                                project: '注射',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 21,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 50020,
                                project: '注射',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 8,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 50030,
                                project: '注射',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 18,
                                frequency: '1.04',
                                int: 18,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    },
                    {
                        id: 600,
                        project: '输液',
                        room: '诊室汇总',
                        PersonTime: 18,
                        Number: 21,
                        frequency: '1.04',
                        int: 308,
                        PTime: '1.3',
                        numberBuyers: '39',
                        purchase: 56,
                        perPurchase: '536',
                        children: [
                            {
                                id: 60010,
                                project: '输液',
                                room: '一诊',
                                PersonTime: 6,
                                Number: 9,
                                frequency: '1.04',
                                int: 8,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 18,
                                perPurchase: '536'
                            },
                            {
                                id: 60020,
                                project: '输液',
                                room: '二诊',
                                PersonTime: 5,
                                Number: 11,
                                frequency: '1.04',
                                int: 38,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 15,
                                perPurchase: '536'
                            },
                            {
                                id: 60030,
                                project: '输液',
                                room: '三诊',
                                PersonTime: 11,
                                Number: 18,
                                frequency: '1.04',
                                int: 30,
                                PTime: '1.3',
                                numberBuyers: '21',
                                purchase: 16,
                                perPurchase: '536'
                            }
                        ]
                    }
                ]
            }
        }
    }
</script>
